#ifndef MEDIA_FOCUS_CONTROL_H
#define MEDIA_FOCUS_CONTROL_H



//如果是.c文件，需要加入此宏的控制，如果是.cpp文件则不需要
#ifdef __cplusplus
extern "C" {
#endif
//register callback

#define AUDIO_CHANNEL_STOP 			0
#define AUDIO_CHANNEL_MEDIA 		1
#define AUDIO_CHANNEL_PHONE 		2
#define AUDIO_CHANNEL_SPEECH 		3
#define AUDIO_CHANNEL_NAVIGATION 	4


//观察android MediaFocusControl 设置的音频通道变化
/**
 * channel: 0=stop,1=media,2=phone,3=speech,4=navigation
 */
void OnRequestAudioChannelChanged(int channel);

void OnAirPlayAudioFocusChanged(int audioType,int ownFocus);

void RegisterRequestAudioFocus(int (*pFunc)(int audioType));
void RegisterAbandonAudioFocus(int (*pFunc)(int audioType));

void RegisterRequestSetupAudio(int (*pFunc)(int audioType,int delay,int sampleRate,int bits,int channels));
void RegisterRequestTeardownAudio(int (*pFunc)(int audioType,int delay,int sampleRate,int bits,int channels));



#ifdef __cplusplus
}
#endif

#endif // MEDIA_FOCUS_CONTROL_H
